{% extends "base.html" %}
{% load i18n %}
{% load human %}

{% block title %}{{ _("profile")|capfirst }}{% endblock %}

{% block content %}
<h1>{% blocktrans with http_request.user.first_name as first_name %}Hi {{ first_name }}!{% endblocktrans %}</h1>

<p class="admonition hint">
{{ _("This is your private profile page. Only you can see it.") }}
</p>

<h2>{{ _("your screenshot factories")|capfirst }}</h2>
<table class="factories vertical">
<thead>
<tr>{{ factory_table_header }}</tr>
</thead>
<tbody>
{% for factory in factory_list %}
<tr class="{% cycle row1,row2 %}">{{ factory.table_row }}</tr>
{% endfor %}
</tbody>
</table>
<p><a href="/browsers/add/">{{ _("Register this browser for screenshots?") }}</a></p>
{% if error_list %}
<h2>{{ _("recent factory errors")|capfirst }}</h2>
<table class="errors vertical">
<thead>
<tr>
<th>{{ _("factory")|capfirst|human_br }}</th>
<th>{{ _("code")|capfirst|human_br }}</th>
<th>{{ _("message")|capfirst|human_br }}</th>
<th>{{ _("age")|capfirst|human_br }}</th>
</tr>
</thead>
<tbody>
{% for error in error_list %}
<tr class="{% cycle row1,row2 %}">
<td>{{ error.factory|human_link }}</td>
<td>{{ error.code }}</td>
<td>{{ error.message }}</td>
<td>{{ error.occurred|human_timesince }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% if current_balance %}
<h2>{{ _("account balance")|capfirst }}</h2>
<p>You have {{ current_balance }} points in your Browsershots account.
(<a href="/points/">Details</a>)</p>
{% endif %}
{% endblock %}
